package bigoo.peer;

import java.io.Serializable;

public class Ride implements Serializable {

    private static final long serialVersionUID = 1L;
    private final String rideID;
    private final int destination;
    private final int places;
    private final int timestamp;
    private final int version;
    private final String peerID;

    public Ride(int destination, String rideID, String peerID, int places, int timestamp, int version) {
	this.destination = destination;
	this.peerID = peerID;
	this.rideID = rideID;
	this.places = places;
	this.timestamp = timestamp;
	this.version = version;
    }

    public String getRideID() {
	return this.rideID;
    }

    public int getDestination() {
	return this.destination;
    }

    public int getPlaces() {
	return this.places;
    }

    public int getTimestamp() {
	return this.timestamp;
    }

    public int getVersion() {
	return this.version;
    }

    public String getPeerID() {
	return this.peerID;
    }

    @Override
    public String toString() {
	return this.rideID + "|" + this.version + "|" + this.destination + "|" + this.timestamp + "|" + this.places;
    }
}
